package com.comunity_cloud.exceptions;

public class TransportException extends Exception {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5864278169199531124L;
	
	private int statusCode;
	private String request;

	private String responseBody;

	public TransportException() {
		super();
	}

	public TransportException(String detailMessage, Throwable throwable) {
		super(detailMessage, throwable);
	}

	public TransportException(String detailMessage) {
		super(detailMessage);
	}

	public TransportException(Throwable throwable) {
		super(throwable);
	}

	public TransportException(String statusReason, int statusCode, String request, String responseBody) {
		super("Reason='" + statusReason + "', code=" + statusCode + ", request='" + request + "'");
		this.statusCode = statusCode;
		this.responseBody = responseBody;
		this.setRequest(request);
	}
	
	public int getStatusCode() {
		return statusCode;
	}

	public void setRequest(String request) {
		this.request = request;
	}

	public String getRequest() {
		return request;
	}	
	
	public String getResponseBody() {
		return responseBody;
	}
	
}
